package com.wuzhazha.javamind.chapter15.test05;

/**
 * 泛型方法类
 */
public class GenericMethods {

    public <T> void f(T x){
        System.out.println(x.getClass().getSimpleName());
    }

    /**
     * 接收多个泛型参数
     * @param a
     * @param b
     * @param c
     * @param <A>
     * @param <B>
     * @param <C>
     */
    public <A,B,C> void f(A a,B b ,C c){
        System.out.println(a.getClass().getSimpleName());
        System.out.println(b.getClass().getSimpleName());
        System.out.println(c.getClass().getSimpleName());
    }

    public <A,B> void f(A a,B b ,String c){
        System.out.println(a.getClass().getSimpleName());
        System.out.println(b.getClass().getSimpleName());
        System.out.println(c.getClass().getSimpleName());
    }

}
